import request from './request'
import { BASE_API } from './request'

// url, methods, params, config

// 登陆
export const userLogin = (params) => {
  return request(`${BASE_API}/v1/login/in`, 'post', params)
}
// 搜索村
export const searchVillage = (params) => {
  return request(`${BASE_API}/v1/housescj/search-villagelist`, 'post', params, {
    hideToast: true
  }, true)
}
// 登陆信息获取
export const loginInfo = (params) => {
  return request(`${BASE_API}/v1/housescj/search-attr`, 'post', params)
}
// 登陆信息确认
export const loginInfoConfirm = (params) => {
  return request(`${BASE_API}/v1/login/confirm`, 'post', params, {}, true)
}

// 房屋列表
export const buildingList = (params) => {
  return request(`${BASE_API}/v1/housescj/search-fwlb`, 'post', params)
}
export const buildingList_hc = (params) => {
  return request(`${BASE_API}/v1/housessqjz/search-fwlb`, 'post', params)
}
// 房屋基本信息
export const buildingBase = (params) => {
  return request(`${BASE_API}/v1/housescj/search-attrbyfwbh`, 'post', params, {}, true)
}
// 房屋采集信息
export const buildingCollection = (params) => {
  return request(`${BASE_API}/v1/housescj/search-attrpc`, 'post', params, {}, true)
}
export const buildingCollection_hc = (params) => {
  return request(`${BASE_API}/v1/housessqjz/search-attrpc`, 'post', params, {}, true)
}
// 自查最新记录
export const buildingCheckSelf = (params) => {
  return request(`${BASE_API}/v1/housescj/search-yhlogdetaile`, 'post', params, {}, true)
}
// 房屋信息填报
export const updateHouse = (params) => {
  return request(`${BASE_API}/v1/housescj/update-house`, 'post', params)
}
export const updateHouse_hc = (params) => {
  return request(`${BASE_API}/v1/housessqjz/update-house`, 'post', params)
}
// 隐患检查
export const updateYhjc = (params) => {
  return request(`${BASE_API}/v1/housescj/update-yhzc`, 'post', params)
}
export const updateYhjc_hc = (params) => {
  return request(`${BASE_API}/v1/housessqjz/update-yhzc`, 'post', params)
}
// 图片上传
export const imgUpload = (params) => {
  return request(`${BASE_API}/v1/zm_buildings/upload`, 'post', params)
}
// 检查记录获取
export const checkLog = (params) => {
  return request(`${BASE_API}/v1/housescj/searchcj-attryhzclog`, 'post', params)
}
export const checkLog_hc = (params) => {
  return request(`${BASE_API}/v1/housessqjz/searchcj-attryhzclog`, 'post', params)
}
//检查记录详情
export const checkLogInfo = (params) => {
  return request(`${BASE_API}/v1/housescj/search-yhlogdetaileall`, 'post', params, {}, true)
}
export const checkLogInfo_hc = (params) => {
  return request(`${BASE_API}/v1/housessqjz/search-yhlogdetaileall`, 'post', params, {}, true)
}


// 待督办列表
export const dangerTodo = (params) => {
  return request(`${BASE_API}/v1/housescj/search-yhdx`, 'post', params)
}
// 房屋隐患（待复核、复核通过
export const dangerDone = (params) => {
  return request(`${BASE_API}/v1/housescj/search-yhdxbyjczt`, 'post', params)
}
// 需复核隐患详情
export const dangerInfo = (params) => {
  return request(`${BASE_API}/v1/housescj/search-yhxq`, 'post', params, {}, true)
}
// 复核隐患
export const dangerInfoAudit = (params) => {
  return request(`${BASE_API}/v1/housescj/search-fh`, 'post', params, {}, true)
}

// 攻坚整治信息获取
export const getRes = (params) => {
  return request(`${BASE_API}/v1/housescj/search-gjzz`, 'post', params, {}, true)
}
// 攻坚整治信息填报
export const updateRes = (params) => {
  return request(`${BASE_API}/v1/housescj/update-gjzztb`, 'post', params)
}
// 2.20	统计分析-基本信息统计
export const getExcute = (params) => {
  return request(`${BASE_API}/v1/housescj/excute`, 'post', params)
}
// 2.21	统计分析-人员疏散通道统计
export const getExcuteAll = (params) => {
  return request(`${BASE_API}/v1/housescj/excuteall`, 'post', params)
}
// 2.22	统计分析-电动自行车违规充电
export const getDdzxcwgcd = (params) => {
  return request(`${BASE_API}/v1/housescj/ddzxcwgcd`, 'post', params)
}
// 2.23	统计分析-违规使用液化石油气
export const getWgsypzyhsyq = (params) => {
  return request(`${BASE_API}/v1/housescj/wgsypzyhsyq`, 'post', params)
}
// 2.24	统计分析-充电设施建设和电费管理
export const getExcutepie = (params) => {
  return request(`${BASE_API}/v1/housescj/excutepie`, 'post', params)
}
// 2.24	2.31自查情况统计
export const jrzcqk = (params) => {
  return request(`${BASE_API}/v1/housescj/tjfx-jrzcqk`, 'post', params)
}
// 行政区
export const getRegion = (params) => {
  return request(`${BASE_API}/v1/admin/district-tree/children`, 'get', params)
}
// 自查统计
export const zctj = (params) => {
  return request(`${BASE_API}/v1/housescj/zctj`, 'post', params)
}
export const zcpie = (params) => {
  return request(`${BASE_API}/v1/housescj/zcpie`, 'post', params)
}
export const zclbar = (params) => {
  return request(`${BASE_API}/v1/housescj/zclbar`, 'post', params)
}

export const housescj_rysstd = (params) => {
  return request(`${BASE_API}/v1/housescj/rysstd`, 'post', params)
}
export const housescjjc_rysstd = (params) => {
  return request(`${BASE_API}/v1/housescjjc/rysstd`, 'post', params)
}
export const housesjzhc_rysstd = (params) => {
  return request(`${BASE_API}/v1/housesjzhc/rysstd`, 'post', params)
}
export const housesqjhc_rysstd = (params) => {
  return request(`${BASE_API}/v1/housesqjhc/rysstd`, 'post', params)
}
export const housessjhc_rysstd = (params) => {
  return request(`${BASE_API}/v1/housessjhc/rysstd`, 'post', params)
}

export const rysstdjspie = (params) => {
  return request(`${BASE_API}/v1/housescj/rysstdjspie`, 'get', params)
}
export const rysstdjswcpie = (params) => {
  return request(`${BASE_API}/v1/housescj/rysstdjswcpie`, 'get', params)
}
// 人员疏散通道达标率排行
export const housescj_dblbar = (params) => {
  return request(`${BASE_API}/v1/housescj/dblbar`, 'post', params)
}
export const housescjjc_dblbar = (params) => {
  return request(`${BASE_API}/v1/housescjjc/dblbar`, 'post', params)
}
export const housesjzhc_dblbar = (params) => {
  return request(`${BASE_API}/v1/housesjzhc/dblbar`, 'post', params)
}
export const housesqjhc_dblbar = (params) => {
  return request(`${BASE_API}/v1/housesqjhc/dblbar`, 'post', params)
}
export const housessjhc_dblbar = (params) => {
  return request(`${BASE_API}/v1/housessjhc/dblbar`, 'post', params)
}

export const ckhlccmsg = (params) => {
  return request(`${BASE_API}/v1/housescj/ckhlccmsg`, 'post', params)
}
export const fhlgspie = (params) => {
  return request(`${BASE_API}/v1/housescj/fhlgspie`, 'post', params)
}
export const fhlfzdspie = (params) => {
  return request(`${BASE_API}/v1/housescj/fhlfzdspie`, 'post', params)
}
export const ckhlccbar = (params) => {
  return request(`${BASE_API}/v1/housescj/ckhlccbar`, 'post', params)
}

export const ddzxcwgcdmsg = (params) => {
  return request(`${BASE_API}/v1/housescj/ddzxcwgcdmsg`, 'post', params)
}
export const ddzxcwgcdbar = (params) => {
  return request(`${BASE_API}/v1/housescj/ddzxcwgcdbar`, 'post', params)
}
export const fztsss = (params) => {
  return request(`${BASE_API}/v1/housescj/fztsss`, 'post', params)
}

export const wgsyyhsyqmsg = (params) => {
  return request(`${BASE_API}/v1/housescj/wgsyyhsyqmsg`, 'post', params)
}
export const wgsyyhsyqbar = (params) => {
  return request(`${BASE_API}/v1/housescj/wgsyyhsyqbar`, 'post', params)
}
//固定警示牌
export const gdjsbt = (params) => {
  return request(`${BASE_API}/v1/housescj/gdjsbt`, 'post', params)
}
export const gdjsbtbar = (params) => {
  return request(`${BASE_API}/v1/housescj/gdjsbtbar`, 'post', params)
}
export const clycdsspbqk = (params) => {
  return request(`${BASE_API}/v1/housescj/clycdsspbqk`, 'post', params)
}
// 自查隐患统计
export const zcyhtj = (params) => {
  return request(`${BASE_API}/v1/housescj/zcyhtj`, 'post', params)
}
export const fxyhltj = (params) => {
  return request(`${BASE_API}/v1/housescj/fxyhltj`, 'post', params)
}
export const zgyhltj = (params) => {
  return request(`${BASE_API}/v1/housescj/zgyhltj`, 'post', params)
}
export const zcqk = (params) => {
  return request(`${BASE_API}/v1/housescj/zcqk`, 'post', params)
}


export const zctj_check = (params) => {
  return request(`${BASE_API}/v1/housesjc/zctj`, 'post', params)
}
export const zcpie_check = (params) => {
  return request(`${BASE_API}/v1/housesjc/zcpie`, 'post', params)
}
export const zclbar_check = (params) => {
  return request(`${BASE_API}/v1/housesjc/zclbar`, 'post', params)
}
export const zcyhtj_check = (params) => {
  return request(`${BASE_API}/v1/housesjc/zcyhtj`, 'post', params)
}
export const fxyhltj_check = (params) => {
  return request(`${BASE_API}/v1/housesjc/fxyhltj`, 'post', params)
}
export const zgyhltj_check = (params) => {
  return request(`${BASE_API}/v1/housesjc/zgyhltj`, 'post', params)
}
export const zcqk_ckeck = (params) => {
  return request(`${BASE_API}/v1/housesjc/zcqk`, 'post', params)
}

export const zctj_hc = (params) => {
  return request(`${BASE_API}/v1/houseshc/zctj`, 'post', params)
}
export const zctj_hc_pie = (params) => {
  return request(`${BASE_API}/v1/houseshc/zcpie`, 'post', params)
}
export const zctj_hc_bar = (params) => {
  return request(`${BASE_API}/v1/houseshc/zclbar`, 'post', params)
}
export const zctj_hc_bar_three = (params) => {
  return request(`${BASE_API}/v1/houseshc/zclscbar`, 'post', params)
}


export const regionmsg = (params) => {
  return request(`${BASE_API}/v1/admin/district-tree/regionmsg`, 'get', params)
}
export const getCheckRecordList = (params) => {
  return request(`${BASE_API}/v1/housescj/searchcj-attryhzcfw`, 'post', params)
}

export const updateUserName = (params) => {
  return request(`${BASE_API}/v1/housescj/updateusername`, 'post', params, {}, true)
}
export const updateUnitName = (params) => {
  return request(`${BASE_API}/v1/housescj/updateunitname`, 'post', params, {}, true)
}
export const housescj_dbData = (params) => {
  return request(`${BASE_API}/v1/housescj/searchcj-dbfw`, 'post', params)
}
export const housescjjc_dbData = (params) => {
  return request(`${BASE_API}/v1/housescjjc/searchcj-dbfw`, 'post', params)
}
export const housesjzhc_dbData = (params) => {
  return request(`${BASE_API}/v1/housesjzhc/searchcj-dbfw`, 'post', params)
}
export const housesqjhc_dbData = (params) => {
  return request(`${BASE_API}/v1/housesqjhc/searchcj-dbfw`, 'post', params)
}
export const housessjhc_dbData = (params) => {
  return request(`${BASE_API}/v1/housessjhc/searchcj-dbfw`, 'post', params)
}

//未自查房屋下钻
export const wzcfw = (params) => {
  return request(`${BASE_API}/v1/housescj/wzcfw`, 'post', params)
}
//未自查房屋详细信息
export const wzcfwdetail = (params) => {
  return request(`${BASE_API}/v1/housescj/wzcfwdetail`, 'post', params)
}

//未检查房屋下钻_
export const wzcfw_check = (params) => {
  return request(`${BASE_API}/v1/housesjc/wzcfw`, 'post', params)
}
//未检查房屋详细信息_check
export const wzcfwdetail_check = (params) => {
  return request(`${BASE_API}/v1/housesjc/wzcfwdetail`, 'post', params)
}

export const weekNoCheckHouse = (params) => {
  return request(`${BASE_API}/v1/housescj/TheWeekNoCheckHouse`, 'post', params)
}
export const monthNoCheckNumber = (params) => {
  return request(`${BASE_API}/v1/housescj/TheMonthNoCheckHouse`, 'post', params)
}
export const uncheckedHouse = (params) => {
  return request(`${BASE_API}/v1/housescj/NoCheckHouseDetaile`, 'post', params)
}
export const monthUncheckedHouse = (params) => {
  return request(`${BASE_API}/v1/housescj/TheMonthNoCheckFwlb`, 'post', params)
}

export const switchUser = (params) => {
  return request(`${BASE_API}/v1/login/switch-user`, 'post', params)
}
export const getTaskList = (params) => {
  return request(`${BASE_API}/v1/housessqjz/taskdata`, 'post', params)
}
export const getTaskDetail = (params) => {
  return request(`${BASE_API}/v1/housessqjz/taskdetaile`, 'post', params)
}
// 获取联系方式
export const getPhone = (params) => {
  return request(`${BASE_API}/v1/housescj/getphone`, 'post', params, {}, true)
}
